	getSchedules = function(station1, station2){
		var now = new Date();
	    var date = getDay(now);
		var hour = getHour(now);
		
		var form = document.getElementById("newSearchForm");
		form.elements["station1"].value = station1;
		form.elements["station2"].value = station2;
		form.elements["date"].value = date;
		form.elements["hour"].value = hour.hour;
		form.elements["am_pm"].value = hour.am_pm;
						
		form.submit();
	}

	getDay = function(now){
		var day = now.getDate();
		var month = now.getMonth()+1;
		var year = now.getFullYear();
		var date = month + "/" + day + "/" + year;
		return date;
	}
	
	getHour = function(now){
		var hour = now.getHours();
		var am_pm = "AM";
		
		if(hour>12){
			hour = hour - 12;
			am_pm = "PM";
		} 
		else if (hour == 12){
			am_pm = "PM";
		}
		else if (hour == 0){
			hour = 12;
		}
		hour = hour + ":30";

		return {hour: hour, am_pm: am_pm};
	}

	setDefaultValues = function(){
		var now = new Date();
	    var date = getDay(now);
		var hour = getHour(now);

		var form = document.getElementById("newSearchForm");
		form.elements["date"].value = date;
		form.elements["hour"].value = hour.hour;
		form.elements["am_pm"].value = hour.am_pm;
	}

	showSearchForm = function(){
		document.getElementById("newSearch").style.display="block";
	}